package day10;

import day9.java86.Dog;
import day9.java86.Qie;

/**
 * @author oldliu
 * @since 1.0
 */
public class DogTest2 {
    public static void main(String[] args) {
        //对象比较
        Dog d=new Dog("哮天犬","公","田园犬",5);
        Dog d1=d;
        System.out.println(d1==d);
        Dog d2=new Dog("哮天犬","母","田园犬",9000);
        System.out.println(">>>>>>>>>>>>>>>>");
        System.out.println("d="+d);
        System.out.println("d2="+d2);
        System.out.println(d==d2);
        boolean b=d.equals(d2);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>");
        System.out.println("equals的结果："+b);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        Qie d4=new Qie("小蓝企鹅","公",4,"蓝鼻企鹅");
        System.out.println("企鹅和小狗比较："+d.equals(d4));
    }
}
